const publish = async token => {
    try {
      await new Promise((resolve) =>
      setTimeout(() => resolve(token)),
    );
    } catch (err) {
      if (!err.statusCode) {
        throw new Error(err)
      }
    }
  }

console.log (publish(42));
